clear;clc;
A=[3/4,1/2,1/4;1/8,1/4,1/2;1/8,1/4,1/4];
p_0=[0.5;0.25;0.25];
[P,D]=eig(A)
syms n
F=P*D^n*P^-1
p_n=F*p_0
vpa(subs(p_n,n,100),4)